package com.LeeCode;

/**
 * 统计位数为偶数的数字
 */

public class Code1295 {
    public static void main(String[] args) {
        int[] nums = {12, 345, 2, 6, 7896};
        System.out.println(new Code1295().findNumbers(nums));
    }

    public int findNumbers(int[] nums) {
        int ans = 0;
        String tmp;
        for (int num : nums) {
            tmp = String.valueOf(num);
            if ((tmp.length() & 1) == 0) {
                ans++;
            }
        }
        return ans;
    }
}
